import request from '/@/utils/request';
enum Api {
    Login = '/Auth/Login',
    RefreshToken = '/Auth/RefreshToken',
    UserInfo = '/Auth/UserInfo',
    Logout = '/Auth/Logout',
    LoginConfig = '/Auth/LoginConfig',
    CaptchaOpenFlag = '/Auth/CaptchaOpenFlag',
    Captcha = '/Auth/Captcha',
}
export const Login = () =>
    request({
        url: `${Api.Login}`,
        method: 'post',
    });
export const Logout = () =>
    request({
        url: `${Api.Logout}`,
        method: 'post',
    });

export const getRefreshToken = (params?: any) =>
    request({
        url: `${Api.RefreshToken}/${params}`,
        method: 'get',
    });

export const getUserInfo = () =>
    request({
        url: `${Api.UserInfo}`,
        method: 'get',
    });

export const getLoginConfig = () =>
    request({
        url: `${Api.LoginConfig}`,
        method: 'get',
    });

export const getCaptchaOpenFlag = () =>
    request({
        url: `${Api.CaptchaOpenFlag}`,
        method: 'get',
    });

export const getCaptcha = () =>
    request({
        url: `${Api.Captcha}`,
        method: 'get',
    });
